import 'package:flutter/services.dart';

class NativeVpnService {
  static const MethodChannel _channel = MethodChannel('com.example.vpn_plugin');

  static Future<String> createProfile() async {
    try {
      final String result = await _channel.invokeMethod('createProfile');
      return result;
    } on PlatformException catch (e) {
      throw Exception("Failed to create VPN profile: ${e.message}");
    }
  }

  static Future<String> disconnect() async {
    try {
      final String result = await _channel.invokeMethod('disconnect');
      return result;
    } on PlatformException catch (e) {
      throw Exception("Failed to disconnect VPN: ${e.message}");
    }
  }
}